home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2001 January / Game.EXE_01_2001.iso / demos / Blade of Darkness / data1.cab / Program_Executable_Files / Scripts / BladeInit.py < prev    next >
Encoding:
Python Source  |  2000-11-16  |  3.1 KB  |  178 lines

  1. #####################################################
  2. #                                                    
  3. #                                                    
  4. #                                                    
  5. #             B L A D E I N I T . P Y                 
  6. #                                                    
  7. #                                                    
  8. #                                                    
  9. #                                                    
  10. #####################################################
  11.  
  12.  
  13. import Bladex
  14. Bladex.SetTime(0)
  15. import string
  16. import Reference
  17. import Language
  18.  
  19. from bladeinit0 import *
  20. #
  21. # Different kind of enemies. Should be called b4 creating ANY PersonEntity!
  22. #
  23. Bladex.OpenProfileSection(3,"BladeInit.Enemies")
  24. import Enemies
  25. Enemies.Init()
  26. Bladex.CloseProfileSection(3)
  27.  
  28.  
  29.  
  30. #
  31. # New animation system (biped) 
  32. #
  33. Bladex.OpenProfileSection(4,"BladeInit.Biped")
  34. import Biped
  35. Biped.Init()
  36. Bladex.CloseProfileSection(4)
  37.  
  38. #
  39. # The sharing of whole sets of animations
  40. #
  41. Bladex.OpenProfileSection(5,"BladeInit.anm_conv")
  42. import anm_conv
  43. anm_conv.Init()
  44. Bladex.CloseProfileSection(5)
  45.  
  46.  
  47. #
  48. # To modify flags of animations 
  49. #
  50. import Anm_Mdf
  51. Anm_Mdf.Init()
  52.  
  53.  
  54. #
  55. # To modify the movements of the camera
  56. #
  57. import AnmCameras
  58. AnmCameras.Init()
  59.  
  60.  
  61.  
  62. #
  63. # Particle Systems init
  64. #
  65. # CUIDADO! Valores definidos tambien en InitParticleSystems.py.
  66. B_PARTICLE_GTYPE_COPY=0
  67. B_PARTICLE_GTYPE_BLEND=1
  68. B_PARTICLE_GTYPE_ADD=2
  69. B_PARTICLE_GTYPE_MUL=3
  70.  
  71. #
  72. # Procedural textures
  73. #
  74. execfile("../../Scripts/AutoGenTextures.py")
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81. #
  82. # PJ Init
  83. #
  84. import GotoMapVars
  85. if string.lower(Bladex.GetCurrentMap()) in ['2dmap','casa','barb_m1','ragnar_m2','dwarf_m3','ruins_m4']: # Caso especial
  86.   execfile("pj.py")
  87.   print "Found 2DMap"
  88. elif not GotoMapVars.BeginLevel():
  89.   execfile("pj.py")
  90. #
  91. # Scorer Data init
  92. #
  93. import Scorer
  94. Scorer.ActivateScorer()
  95.  
  96. import CharStats
  97.  
  98.  
  99. import GameText
  100. GameText.SetLanguage(Language.Current)
  101.  
  102. import DefaultScorerData
  103. DefaultScorerData.Init()
  104.  
  105. # Inicio del personaje y sus marcadores
  106. char=Bladex.GetEntity("Player1")  #Por si acaso
  107. Scorer.SetLevelLimits(0,CharStats.GetCharExperienceCost(char.CharType,char.Level))
  108. Scorer.SetLevelBarValue(char.PartialLevel)
  109. Scorer.SetLevelValue(char.Level)
  110.  
  111.  
  112.  
  113.  
  114. #
  115. # Timers
  116. #
  117. Bladex.CreateTimer("Timer60",1.0/60.0)
  118. Bladex.CreateTimer("Timer30",1.0/30.0)
  119. Bladex.CreateTimer("Timer15",1.0/15.0)
  120.  
  121. #import pywin.debugger
  122. #pywin.debugger.set_trace()
  123.  
  124.  
  125. #
  126. # Controls ( keyboard,mouse...) stuff
  127. #
  128. execfile("../../Scripts/InputInit.py")
  129.  
  130. import acts
  131. acts.InitBindings("Player1")
  132. acts.SetNoConfigurableActions()
  133.  
  134. try:
  135.   execfile("../../Config/Control.py")
  136.   print "BladeInit -> Executed Control.py"
  137. except:
  138.   execfile("../../Scripts/DefControl.py")
  139.   print "BladeInit -> Executed DefControl.py"
  140.  
  141.  
  142. #
  143. # Demo Mode 
  144. #
  145. import  Demo_Stuff
  146. Demo_Stuff.Init()
  147.  
  148.  
  149. #
  150. # Menu
  151. #
  152. import Menu
  153. Menu.InitMenuKeys()
  154.  
  155.  
  156. execfile("../../Scripts/Globals.py")
  157.  
  158.  
  159.  
  160. Bladex.SetListenerPosition(1)
  161. #
  162. # FOR RELEASE VERSIONS, SET TO 0
  163. #
  164.  
  165. if Reference.PYTHON_DEBUG >= 1: 
  166.     ############### DEBUG LEVEL ONE ###############
  167.     execfile("../../Scripts/DebugControl.py")
  168.         
  169.     if Reference.PYTHON_DEBUG >= 2: 
  170.         ############### DEBUG LEVEL TWO ###############
  171.         Bladex.SetCallCheck(3)
  172. else:
  173.     Bladex.SetCallCheck(0)
  174.  
  175. import ItemTypes
  176. import math
  177.